// For debug output to console
LayoutDocument.debug = true;

function LayoutDocument() {
	this.dprint("LayoutDocument constructor");
	
	this.id = 0;
	this.filename = "";
	this.category = "";
	this.title = "";
	this.author = "";
	this.description = "";
	
	this.cssClasses = "";
	this.js = "";
	
}

LayoutDocument.className = "LayoutDocument";
LayoutDocument.nextId = 0;

// Singleton instance
LayoutDocument._theLayoutDocument = null;
function theLayoutDocument() { return LayoutDocument._theLayoutDocument; }

LayoutDocument.prototype.toJSON = function() {
	return "{}";
}

LayoutDocument.prototype.buildFromJSON = function(jsonStr) {
	return {};
}

LayoutDocument.prototype.dprint = function(str) {
	if (LayoutDocument.debug) {
		cprint(LayoutDocument.className + " " + this.id + ": " + str, "#ff0000");
	}
}